# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: Luca Weiss <luca (at) z3ntu (dot) xyz>
# Contributor: Gabriele Musco <emaildigabry@gmail.com>

pkgname=('openrazer-daemon' 'openrazer-driver-dkms' 'python-openrazer')
pkgbase=openrazer
pkgver=3.7.0
pkgrel=1
pkgdesc='Community-led effort to support Razer peripherals on Linux'
arch=('any')
url=https://openrazer.github.io
license=('GPL')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/$pkgbase/$pkgbase.git#tag=v$pkgver")
b2sums=('SKIP')

package_openrazer-daemon() {
  pkgdesc='Userspace daemon that abstracts access to the kernel driver. Provides a DBus service for applications to use'
  depends=(
    'dbus-python'
    'openrazer-driver-dkms'
    'python-daemonize'
    'python-gobject'
    'python-pyudev'
    'python-setproctitle'
    'xautomation'
  )
  optdepends=('python-notify2: for the battery notifier')
  install=$pkgbase-daemon.install

  cd $pkgbase
  make DESTDIR="$pkgdir" daemon_install
}

package_openrazer-driver-dkms() {
  pkgdesc='OpenRazer kernel modules sources'
  depends=('dkms')

  cd $pkgbase
  make DESTDIR="$pkgdir" setup_dkms udev_install
}

package_python-openrazer() {
  pkgdesc='Library for interacting with the OpenRazer daemon'
  depends=('openrazer-daemon' 'python-numpy')

  cd $pkgbase
  make DESTDIR="$pkgdir" python_library_install
}
